<!--# layout("/common/layout.html",{"jsBase":"/js/trans/finTransaction/"}){ -->

<form class="layui-form layui-form-pane" id="addForm"  lay-filter="editform">

    <div class="layui-row">
        <div class="layui-form-item">
            <div class="layui-inline">
            <label class="layui-form-label">交易id</label>
				<div class="layui-input-inline">
                                <input type="text" name="transactionId" id="transactionId" autocomplete="off" class="layui-input" >
				</div>
            </div>
            <div class="layui-inline">
            <label class="layui-form-label">用户id</label>
				<div class="layui-input-inline">
                                <input type="text" name="userId" id="userId" autocomplete="off" class="layui-input" >
				</div>
            </div>
            <div class="layui-inline">
                <label class="layui-form-label">订单id</label>
                <div class="layui-input-inline">
                    <input type="text" name="orderId" id="orderId" autocomplete="off" class="layui-input" >
                </div>
            </div>
        </div>
    </div>

    <div class="layui-row">
        <div class="layui-form-item">
            <div class="layui-inline">
                <label class="layui-form-label">订单类型</label>
                <div class="layui-input-inline">
                    <layui:simpleDictSelect style='layui-input-inline' type="ORDER_TYPE" layVerify=""
                                            id="orderType" name="orderType" value="" />
                </div>
            </div>
            <div class="layui-inline">
            <label class="layui-form-label">支付类型</label>
				<div class="layui-input-inline">
                    <layui:simpleDictSelect style='layui-input-inline' type="PAY_METHOD" layVerify=""
                                            id="payMethod" name="payMethod" value="" />
				</div>
            </div>
            <div class="layui-inline">
            <label class="layui-form-label">appId</label>
				<div class="layui-input-inline">
                                <input type="text" name="appId" id="appId" autocomplete="off" class="layui-input" >
				</div>
            </div>
        </div>
    </div>

    <div class="layui-row">
        <div class="layui-form-item">
            <div class="layui-inline">
            <label class="layui-form-label">商户号</label>
				<div class="layui-input-inline">
                                <input type="text" name="merchantId" id="merchantId" autocomplete="off" class="layui-input" >
				</div>
            </div>
            <div class="layui-inline">
            <label class="layui-form-label">账户账号</label>
				<div class="layui-input-inline">
                                <input type="text" name="merchantAccount" id="merchantAccount" autocomplete="off" class="layui-input" >
				</div>
            </div>
            <div class="layui-inline">
                <label class="layui-form-label">购买者id</label>
                <div class="layui-input-inline">
                    <input type="text" name="consumerId" id="consumerId" autocomplete="off" class="layui-input" >
                </div>
            </div>
        </div>
    </div>

    <div class="layui-row">
        <div class="layui-form-item">
            <div class="layui-inline">
                <label class="layui-form-label">购买者账号</label>
                <div class="layui-input-inline">
                    <input type="text" name="consumerAccount" id="consumerAccount" autocomplete="off" class="layui-input" >
                </div>
            </div>
            <div class="layui-inline">
            <label class="layui-form-label">交易号</label>
				<div class="layui-input-inline">
                                <input type="text" name="tradeNo" id="tradeNo" autocomplete="off" class="layui-input" >
				</div>
            </div>
            <div class="layui-inline">
            <label class="layui-form-label">交易金额</label>
				<div class="layui-input-inline">
                                <input type="text" name="totalMoney" id="totalMoney" autocomplete="off" class="layui-input" >
				</div>
            </div>
        </div>
    </div>

    <div class="layui-row">
        <div class="layui-form-item">
            <div class="layui-inline">
                <label class="layui-form-label">支付状态</label>
                <div class="layui-input-inline">
                    <layui:simpleDictSelect style='layui-input-inline' type="PAY_FLAG" layVerify=""
                                            id="payFlag" name="payFlag" value="" />
                </div>
            </div>
            <div class="layui-inline">
            <label class="layui-form-label">支付时间</label>
				<div class="layui-input-inline">
                                <input type="text" name="payTime" id="payTime" autocomplete="off" class="layui-input" >
				</div>
            </div>
            <div class="layui-inline">
            <label class="layui-form-label">退款时间</label>
				<div class="layui-input-inline">
                                    <input type="text" name="refundTime"  id="refundTime" autocomplete="off" class="layui-input" >
				</div>
            </div>
        </div>
    </div>

    <div class="layui-row">
        <div class="layui-form-item">
            <div class="layui-inline">
                <label class="layui-form-label">创建时间</label>
                <div class="layui-input-inline">
                    <input type="text" name="createTime"  id="createTime" autocomplete="off" class="layui-input" >
                </div>
            </div>
            <div class="layui-inline">
            <label class="layui-form-label">退款单id</label>
				<div class="layui-input-inline">
                                <input type="text" name="refundId" id="refundId" autocomplete="off" class="layui-input" >
				</div>
            </div>
            <div class="layui-inline">
            <label class="layui-form-label">交易备注</label>
				<div class="layui-input-inline">
                                <input type="text" name="tradeMemo" id="tradeMemo" autocomplete="off" class="layui-input" >
				</div>
            </div>
        </div>
    </div>

    <div class="layui-row">
        <div class="layui-form-item">
            <div class="layui-inline">
            <label class="layui-form-label">callback</label>
				<div class="layui-input-inline">
                                <input type="text" name="callback" id="callback" autocomplete="off" class="layui-input" >
				</div>
            </div>
            <div class="layui-inline">
            <label class="layui-form-label">来源</label>
				<div class="layui-input-inline">
                    <input type="text" name="comeFrom" id="comeFrom" autocomplete="off" class="layui-input" >
				</div>
            </div>
            <div class="layui-inline">
                <label class="layui-form-label">提示信息</label>
                <div class="layui-input-inline">
                    <input type="text" name="errorJson" id="errorJson" autocomplete="off" class="layui-input" >
                </div>
            </div>
        </div>
    </div>

    <div class="layui-row">
        <div class="layui-form-item" style="position:absolute;right:10px;bottom:0px;">
            <button class="layui-btn" type="button" id="addButton-cancel">关闭</button>
        </div>
    </div>
</form>
<!--#} -->
<script>
layui.define([ 'form', 'laydate', 'table','finTransactionApi'], function(exports) {
    var form = layui.form;
    var finTransactionApi = layui.finTransactionApi;
    var index = layui.index;
    var isNew = true;
    <!--# if(!(isEmpty(finTransactionJson))){  -->
    isNew = false;
    <!--# } -->
    var view = {
        init:function(){
            Lib.initGenrealForm($("#addForm"),form);
            this.initSubmit();
        },
        initSubmit:function(){
            $("#addButton").click(function(){
                form.on('submit(form)', function(){
                    finTransactionApi.saveForm(isNew,$('#addForm'),function(){
                        parent.window.dataReload();
                        Common.info("保存成功");
                        Lib.closeFrame();
                    });
                });
            });

            $("#addButton-cancel").click(function(){
                Lib.closeFrame();
            });
        }

    }
    view.init();
    <!--# if(!(isEmpty(finTransactionJson))){  -->
    var formJson = ${finTransactionJson};
    form.val("editform",formJson);
    <!--# } -->
});
</script>
